home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d14 / dlchk11.arc / DLCHECK.DOC < prev    next >
Text File  |  1991-04-28  |  7KB  |  190 lines

  1.                                  DLCHECK.BAT
  2.                                 Documentation
  3.                                by Duane Paulson
  4.  
  5.                       Copyright (c) 1990, 1991 Duane Paulson
  6.  
  7.  
  8. DLCHECK.BAT is a batch file intended to automate the process of checking
  9. downloaded files for computer virus. License is given to individuals and orga-
  10. nizations to implement as many copies of DLCHECK.BAT as required without the
  11. payment of registration fees. You may modify copies of DLCHECK.BAT for inter-
  12. nal use. However, if distributed, DLCHECK.BAT must be distributed in its
  13. original form. DLCHECK.DOC (this document) must be included in the archive
  14. package (or on the distribution disk) with DLCHECK.BAT. The public domain
  15. file SETER.EXE must also be included in the distribution package.
  16. DLCHECK.DOC may not be modified under any circumstance.
  17.  
  18. _____
  19.  
  20. ACKNOWLEDGEMENTS AND CREDITS:
  21.  
  22. SCAN Copyright 1989-90 by McAfee Associates
  23. PKUNZIP (R) Copr. 1989-1990 PKWARE Inc. PKUNZIP Reg. U.S. Pat. and Tm. Off.
  24. PKUNPAK Copyright (c) 1986-1988 PKWARE Inc.
  25. LHarc Copyright (c) Haruyasu Yoshizaki, 1988-89.
  26. Pak Copyright 1988-89 NoGate Consulting
  27. Public domain Looz extractor/lister/tester by Rahul Dhesi
  28.  
  29. _____
  30.  
  31. REQUIREMENTS:
  32.  
  33. You will need:
  34.  
  35. The latest version of SCAN.EXE (VIRUSCAN) by McAfee Associates. Be sure to
  36. keep current with this
  37.  
  38. If you download files in .ZIP format, you will need the latest version of
  39. PKUNZIP.
  40.  
  41. If you download files in .ARC format, you will need PKUNPAK, available as part
  42. of PK361.EXE.
  43.  
  44. If you download files in .LZH format, you will need the latest version of
  45. LHarc.
  46.  
  47. If you download files in .PAK format, you will need the latest version of PAK.
  48.  
  49. If you download files in .ZOO format, you will need the latest version of
  50. LOOZ. ZOO.EXE will not work with DLCHECK, since it will not accept wildcards.
  51. LOOZ is a necessity.
  52.  
  53. The DLCHECK.BAT file itself, and
  54.  
  55. SETERR.EXE, which is distributed with DLCHECK.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. _____
  68.  
  69. INSTALLATION:
  70.  
  71.  
  72. DLCHECK.BAT has been tested on DOS 3.30.
  73.  
  74. The above files must be in your comm subdirectory, or available on your DOS
  75. path.
  76.  
  77. DLCHECK writes to the DOS environment. If you haven't already done so, I
  78. recommend adding the following line to your CONFIG.SYS file:
  79.  
  80.                 SHELL=C:\COMMAND.COM /P /E:2048
  81.  
  82. DLCHECK looks for newly downloaded files in a subdirectory called \NEW_FILE.
  83. You will need to create this subdirectory on your disk, and modify your comm
  84. software to download files into this subdirectory. Note that this subdirectory
  85. is meant to be cleaned out after every comm session, so don't store any
  86. permanent files in \NEW_FILE. They will be deleted.
  87.  
  88. _____
  89.  
  90. USAGE:
  91.  
  92. For best results, DLCHECK should be run from a batch file as an extension of
  93. your comm program. I recommend a batch file of the following sort:
  94.  
  95. REM Replace the following line with your comm program
  96.      comm.com
  97.     
  98. REM After your comm session is over, you will want to run DLCHECK
  99.      command /c /e:2048 dlcheck.bat
  100. REM I recommend the above form of calling DLCHECK instead of
  101. REM "call dlcheck.bat" because "call" does not preserve the size
  102. REM of the DOS environment.
  103.  
  104. REM If DLCHECK terminates normally and without detecting virii,
  105. REM errorlevel will be set to 0.
  106.      if errorlevel 0 if not errorlevel 1 copy \new_file\*.* \YOUR_DOWNLOAD_DIR
  107.  
  108. REM Now all that's left to do is delete the files in \new_file
  109. REM if no virii have been found.
  110.      if errorlevel 0 if not errorlevel 1 del \new_file\*.*
  111.      if errorlevel 0 if not errorlevel 1 cd \YOUR_COMM_DIR
  112.  
  113. Ideally, you should name this batch file something that is easier to type in
  114. than the name of your comm program, since that will give you incentive to use
  115. it. Perhaps you are already using a batch file with your comm program, to set
  116. download parameters, etc. If so, you can just add the DLCHECK calling routine
  117. on to it. The idea is to make DLCHECK so much a part of your comm routine,
  118. that it is automatically called each time you run your comm program.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. _____
  134.  
  135. HOW DLCHECK OPERATES.
  136.  
  137. DLCHECK will scan downloaded archive files to two levels of archiving. That
  138. is, it will open and inspect an archive within an archive. If an archive
  139. within an archive within an archive is found, DLCHECK will not open the ar-
  140. chive nested to the third level. No doubt there are legitimate reasons for
  141. nesting an archive to three levels, but you should proceed with caution
  142. nevertheless. A message will be displayed if a third-level nested archive is
  143. found.
  144.  
  145. Note: Due to the nature of LOOZ, all nested archives, to any number of levels,
  146. are opened with a wildcard command. If you download ZOO format files, try to
  147. get a look at them with an online viewer, if available.
  148.  
  149.  
  150. DLCHECK will display messages to the screen from the various unarchiving pro-
  151. grams and SCAN.EXE as they are run. DLCHECK will also present a summary of
  152. results just before it terminates. In addition, DLCHECK will cause DOS error-
  153. levels to be generated so that the results of DLCHECK can be utilized by other
  154. programs. I feel that errorlevels are more reliable than trying to pass en-
  155. vironmental variables between batch files. According to the DOS manual, the
  156. "cloned" environment is not preserved upon return to the calling batch pro-
  157. gram.
  158.  
  159. _____
  160.  
  161. ERRORLEVELS:
  162.  
  163. Upon termination, SCAN.EXE passes one of three errorlevels (exit codes) to
  164. DOS:
  165.  
  166.         0 - Normal termination, no viruses found
  167.         1 - One or more viruses found
  168.         2 - Abnormal termination (Error)
  169.  
  170. Since SCAN may be run up to three times during a DLCHECK session, I have
  171. devised a hierarchy for preserving errorlevels passed by SCAN:
  172.  
  173.     1 - Viruses found. Highest priority. Termination of SCAN with error-
  174.         level 1 on any running will result in DLCHECK terminating with
  175.         an errorlevel of 1.
  176.  
  177.     2 - Abnormal termination. This errorlevel will be passed to DOS by
  178.         DLCHECK only if no viruses were found on another running of SCAN
  179.         in the current DLCHECK session.
  180.  
  181.     0 - Normal termination, no viruses found. Lowest priority. This
  182.         errorlevel will be returned if, and only if, SCAN.EXE terminated
  183.         with errorlevel 0 on all its passes.
  184.  
  185. Errorlevels are passed from DLCHECK to DOS through the use of SETERR.EXE.
  186. It replaces the ERRLV-n.COM programs that were distributed with the first
  187. version. SETERR.EXE sets an errorlevel of 0 to 255. The errorlevel is passed
  188. to SETERR as a command line parameter. See SETERR.DOC for more information.
  189. Feel free to use SETERR.EXE with your own batch files.
  190.